package com.homer.android.sdk.db.greenrobot.daos;


import com.homer.android.sdk.object.db.IApDB;

import de.greenrobot.dao.DaoException;

public class ApDB implements IApDB
{
    
    private Long id;
    
    /** Not-null value. */
    private String bssid;
    
    /** Not-null value. */
    private String ssid;
    
    /** Not-null value. */
    private String password;
    
    private boolean isLastSelected;
    
    private int configuredFailedCount;
    
    /** Not-null value. */
    private String deviceBssids;
    
    /** Used to resolve relations */
    private transient DaoSession daoSession;
    
    /** Used for active entity operations. */
    private transient ApDBDao myDao;
    
    // KEEP FIELDS - put your custom fields here
    // KEEP FIELDS END
    
    public ApDB()
    {
    }
    
    public ApDB(Long id)
    {
        this.id = id;
    }
    
    public ApDB(Long id, String bssid, String ssid, String password, boolean isLastSelected, int configuredFailedCount,
        String deviceBssids)
    {
        this.id = id;
        this.bssid = bssid;
        this.ssid = ssid;
        this.password = password;
        this.isLastSelected = isLastSelected;
        this.configuredFailedCount = configuredFailedCount;
        this.deviceBssids = deviceBssids;
    }
    
    /** called by internal mechanisms, do not call yourself. */
    public void __setDaoSession(DaoSession daoSession)
    {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getApDBDao() : null;
    }
    
    public Long getId()
    {
        return id;
    }
    
    public void setId(Long id)
    {
        this.id = id;
    }
    
    /** Not-null value. */
    public String getBssid()
    {
        return bssid;
    }
    
    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setBssid(String bssid)
    {
        this.bssid = bssid;
    }
    
    /** Not-null value. */
    public String getSsid()
    {
        return ssid;
    }
    
    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setSsid(String ssid)
    {
        this.ssid = ssid;
    }
    
    /** Not-null value. */
    public String getPassword()
    {
        return password;
    }
    
    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setPassword(String password)
    {
        this.password = password;
    }
    
    public boolean getIsLastSelected()
    {
        return isLastSelected;
    }
    
    public void setIsLastSelected(boolean isLastSelected)
    {
        this.isLastSelected = isLastSelected;
    }
    
    public int getConfiguredFailedCount()
    {
        return configuredFailedCount;
    }
    
    public void setConfiguredFailedCount(int configuredFailedCount)
    {
        this.configuredFailedCount = configuredFailedCount;
    }
    
    /** Not-null value. */
    public String getDeviceBssids()
    {
        return deviceBssids;
    }
    
    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setDeviceBssids(String deviceBssids)
    {
        this.deviceBssids = deviceBssids;
    }
    
    /** Convenient call for {@link AbstractDao#delete(Object)}. Entity must attached to an entity context. */
    public void delete()
    {
        if (myDao == null)
        {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.delete(this);
    }
    
    /** Convenient call for {@link AbstractDao#update(Object)}. Entity must attached to an entity context. */
    public void update()
    {
        if (myDao == null)
        {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.update(this);
    }
    
    /** Convenient call for {@link AbstractDao#refresh(Object)}. Entity must attached to an entity context. */
    public void refresh()
    {
        if (myDao == null)
        {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.refresh(this);
    }
    
    // KEEP METHODS - put your custom methods here
    // KEEP METHODS END
    
}

